import { _decorator, Animation, AnimationClip, Component, Node, SpriteFrame } from 'cc';
import State from './State';
import { FSM_PARAM_TYPE_ENUM } from '../Enums';
import { StateMachine } from './StateMachine';
const { ccclass, property } = _decorator;

export abstract class SubStateMachine {

    private _currentState: State = null

    stateMachine: Map<string, State> = new Map()

    constructor(public fms: StateMachine) {

    }

    get currentState() {
        return this._currentState
    }

    set currentState(newState: State) {
        this._currentState = newState
        this._currentState.run()
    }

    abstract run(): void

}


